// 管理网络请求
import baseUrl from './baseUrl.js'
let http = (option={})=> {
	return new Promise((resolve,reject)=>{
		uni.request({
			url: baseUrl+"/api/"+option.url,
			method: option.method || 'get',
			header: option.header ||  {
				"content-type":"application/json"
			},
			timeout: option.timeout || 60000,
			data: option.data || {
				
			},
			success:resolve,
			fail:reject
		})
	})
	
}



export default http;